home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 December
/
PCWorld_1999-12_cd.bin
/
Software
/
Servis
/
UrthMDB
/
Urthman's MDB Headers.ht_
/
Urthman's MDB Headers.ht
Wrap
Text File
|
1999-10-03
|
13KB
|
284 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Headers and Trailers</title>
</head>
<body bgcolor="#A3CDDA">
<div align="center"><center>
<table border="1" cellpadding="8" cellspacing="0" width="100%"
bgcolor="#5A8BAB">
<tr>
<td align="center" width="100%"><font color="#FFFF00"
size="6" face="Arial"><em><strong><b>Urthman's MDB
Construction Kit.</b></strong></em></font></td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" cellpadding="4" cellspacing="4" width="100%">
<tr>
<td align="center"><font size="5" face="Arial"><em><b>ASCII
File Headers and Trailers</b></em></font></td>
</tr>
</table>
</center></div>
<p align="center"><font face="Arial"><strong>What are headers and
trailers, and when, if at all, should they be used.</strong></font></p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="6" width="75%">
<tr>
<td align="center" width="50%"><a href="#Comma"><font
face="Arial"><strong>Comma Delimited Files</strong></font></a></td>
<td align="center" width="50%"> </td>
</tr>
<tr>
<td align="center" width="50%"><a href="#Fixed"><font
face="Arial"><strong>Fixed Record Length Files</strong></font></a></td>
<td align="center" width="50%"><a
href="Urthman's%20MDB%20Construction%20Kit.htm"><font
face="Arial"><strong>Main Document</strong></font></a></td>
</tr>
</table>
</center></div>
<hr>
<p><a name="Comma"><font face="Arial"><strong>Comma</strong></font></a><font
face="Arial"><strong> Delimited File formats:</strong></font></p>
<p><font size="2" face="Arial">In comma-delimited files, the
header record contains the column headings for the data records
that follow that header record. Generally, this file format is
used to transfer files from one database or spreadsheet program
to another without having to be too concerned about the sender
and recipient having the same spread sheet or database program.
The header information is used as column headings in a users
spread sheet program, and to inform the software importing the
data, where each element in each data record should go.</font></p>
<p><font size="2" face="Arial">The code generated by the <strong>Urthman's
MDB Construction Kit</strong> for exporting comma delimited files
includes an option to write a header record containing the data
field names. The code generated for importing comma delimited
formats uses the header record to align the columns of data with
the appropriate corresponding fields of the database table into
which the data is being imported. This permits the following
scenario:</font></p>
<ol>
<li><font size="2" face="Arial">The software exports selected
data records from a data base to a CSV file with headers.</font></li>
<li><font size="2" face="Arial">A user imports this data into
a spreadsheet, and reorganizes the columns to suit his or
her needs.</font></li>
<li><font size="2" face="Arial">The user makes some minor
edits to some of the data and exports this to a comma
delimited file.</font></li>
<li><font size="2" face="Arial">The software imports the
data, and the minor edits become written into the
database.</font></li>
</ol>
<p><font size="2" face="Arial">The most significant part is that
the data is imported into the correct data fields despite the
fact that the columns have been moved around, and some columns
may have been deleted. Columns that have been removed will result
in null or default data in the record.</font></p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td valign="top"><a name="Fixed"><font size="3"
face="Arial"><strong>Fixed</strong></font></a><font
size="3" face="Arial"><strong> Length Record formats:</strong></font></td>
<td><p align="center"><font face="Arial"><strong>Schematic</strong></font></p>
</td>
</tr>
<tr>
<td valign="top" width="50%"><font size="2" face="Arial">The
fixed record length file format is the predominant
practice found in the exchange of data within the
telecommunications, insurance and banking industries.
Often, file and batch headers and trailers are used for
organizing the data within the files.</font><p><font
size="2" face="Arial">In fixed length record formats,
header and trailer records are used for grouping detail
records by a type or category The header record contains
some common data element(s) shared by the enclosed detail
records, while the trailer record might repeat the same
data elements as the header, and also contain some
summary data used to validate the integrity of the
enclosed data.</font></p>
<p><font size="2" face="Arial">Fixed length record
formatted files can include both a file header and
trailer, as well as batch header and trailer groups. This
is generally a practice used where multiple companies are
sending or receiving data files between each other. The
file header might contain data that identifies who the
sending and receiving companies are, and the trailer
record might contain a summary of the enclosed batches.</font></p>
</td>
<td align="center" valign="top" width="50%"><div
align="center"><center><table border="1" cellpadding="4"
width="90%" bgcolor="#0000FF">
<tr>
<td align="center"><font color="#FFFF00" size="2"
face="Arial"><strong>FILE HEADER RECORD<br>
</strong></font><div align="center"><center><table
border="1" cellpadding="4" width="75%"
bgcolor="#C0C0C0">
<tr>
<td align="center"><font color="#800080"
size="2" face="Arial"><strong>BATCH
HEADER RECORD<br>
</strong></font><div align="center"><center><table
border="1" cellpadding="4"
bgcolor="#FFFFFF">
<tr>
<td align="center"><font
color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font><p><font
color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font></p>
<p><font color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font></p>
</td>
</tr>
</table>
</center></div><p><font color="#800080"
size="2" face="Arial"><strong>BATCH
TRAILER RECORD</strong></font></p>
</td>
</tr>
</table>
</center></div><div align="center"><center><table
border="1" cellpadding="4" width="75%"
bgcolor="#C0C0C0">
<tr>
<td align="center"><font color="#800080"
size="2" face="Arial"><strong>BATCH
HEADER RECORD<br>
</strong></font><div align="center"><center><table
border="1" cellpadding="4"
bgcolor="#FFFFFF">
<tr>
<td align="center"><font
color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font><p><font
color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font></p>
<p><font color="#004080" size="2"
face="Arial"><strong>DATA DETAIL
RECORD</strong></font></p>
</td>
</tr>
</table>
</center></div><p><font color="#800080"
size="2" face="Arial"><strong>BATCH
TRAILER RECORD</strong></font></p>
</td>
</tr>
</table>
</center></div><p><font color="#FFFF00" size="2"
face="Arial"><strong>FILE TRAILER RECORD</strong></font></p>
</td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</center></div>
<p><font size="2" face="Arial">The <strong>Urthman's MDB
Construction Kit</strong> allows you, the programmer, to select
header and trailer record layouts for any given table, and to
define up to three elements for each of the headers and trailers
as recognition codes. While importing data, the incoming record
is tested for these recognition elements, and when encountered,
the header or trailer record is broken out into it's component
parts as needed. Also, during this import function, a variable (<strong>RecType</strong>)
is set to indicate the record that had just been imported.</font></p>
<ul>
<li><font size="2" face="Arial"><strong>HDR</strong> - Comma
Delimited Header record</font></li>
<li><font size="2" face="Arial"><strong>DTL</strong> - Comma
Delimited Detail record</font></li>
<li><font size="2" face="Arial"><strong>FHD</strong> - Fixed
Length File Header record - the beginning of a file</font></li>
<li><font size="2" face="Arial"><strong>FTL</strong> - Fixed
Length File Trailer record - the end or summary of a file</font></li>
<li><font size="2" face="Arial"><strong>BHD</strong> - Fixed
Length Batch Header record - the beginning of a batch</font></li>
<li><font size="2" face="Arial"><strong>BTL</strong> - Fixed
Length Batch Trailer record - the end or summary of a
batch</font></li>
<li><font size="2" face="Arial"><strong>DET</strong> - Fixed
Length Detail record</font></li>
</ul>
<p><font size="2" face="Arial">The Construction Kit also sets up
the subroutines necessary for exporting these same headers and
trailers. Please note that the same elements used to identify
these records are included in the generated code, where the
values of these elements are set just before writing the record
to the file.</font></p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="8" cellspacing="0" width="100%">
<tr>
<td align="center" width="33%"><div align="center"><center><table
border="0" cellpadding="8" cellspacing="0"
bgcolor="#C0C0C0">
<tr>
<td align="right" valign="top"><font
color="#000000" size="1" face="Arial"><strong>Contact:</strong></font></td>
<td valign="top"><font color="#000000" size="1"
face="Arial"><strong>John Stanley Enterprises</strong><br>
PO Box 1672<br>
Valrico, FL 33595-1672</font></td>
</tr>
<tr>
<td align="right" valign="top"><font size="1"
face="Arial"><strong>URL:</strong></font></td>
<td><a href="http://www.a-znet.com/jse/"><font
size="1" face="Arial"><strong>http://www.a-znet.com/jse/</strong></font></a></td>
</tr>
<tr>
<td align="right" valign="top"><font
color="#000000" size="1" face="Arial"><strong>Email:</strong></font></td>
<td valign="top"><a href="mailto:urthman@usa.net"><font
color="#000000" size="1" face="Arial"><strong>urthman@usa.net</strong></font></a><font
color="#000000" size="1" face="Arial"><strong> </strong></font></td>
</tr>
</table>
</center></div></td>
<td align="center" width="33%"> </td>
<td align="center" width="33%"><font size="1"
face="Arial">Microsoft, Windows, NT and Visual Basic are
registered trademarks of the Microsoft Corporation.</font></td>
</tr>
</table>
</center></div>
</body>
</html>